home *** CD-ROM | disk | FTP | other *** search
/ Aminet 41 / Aminet 41 (2001)(Schatztruhe)[!][Feb 2001].iso / Aminet / util / sys / InstallerNG.lha / InstallerNG / examples / iconpos.installer < prev    next >
Text File  |  2000-10-02  |  1KB  |  61 lines

  1.  
  2. (user EXPERT)
  3.  
  4. (trace)
  5.  
  6. ; ask the user for the icon to be moved
  7. (set #theicon (askfile (prompt "Please select the icon to be modified")
  8.                        (help "")
  9.                        (default "sys:")
  10.  
  11.               )
  12. )
  13. (set #theicon (substr #theicon 0 (- (strlen #theicon) 5)))
  14.  
  15. ; examine the icon
  16. (iconinfo (dest #theicon)
  17.           (getposition "#theicon_X" "#theicon_Y")
  18. )
  19.  
  20. ; change the values
  21. (swing
  22.   (set #theicon_newX (asknumber (prompt "Change X value")
  23.                                 (help "")
  24.                                 (default #theicon_X)
  25.                      )
  26.   )
  27.   (set #theicon_newY (asknumber (prompt "Change Y value")
  28.                                 (help "")
  29.                                 (default #theicon_Y)
  30.                      )
  31.   )
  32.   (message "Sure to move the icon\n'" #theicon "'\nfrom\n\n"
  33.            #theicon_X "," #theicon_Y "\n\n"
  34.            "to\n\n"
  35.            #theicon_newX "," #theicon_newY
  36.   )
  37. )
  38.  
  39. (tooltype (dest #theicon)
  40.           (setposition #theicon_newX #theicon_newY)
  41. )
  42.  
  43. ; some more modifications?
  44. (if (askbool (prompt "Do you need to modify one more Icon?")
  45.              (help "")
  46.              (choices "Yes, immediately" "Nope, quit")
  47.     )
  48.  
  49.     ; then
  50.     (
  51.       (trace)
  52.       (retrace)
  53.     )
  54. )
  55.  
  56. ; quiet exit
  57. (exit (quiet))
  58. (welcome)
  59.  
  60.  
  61.